getRigidBody = () => {
    var prefabIndex = 0;
    for (var i = 0; i < global.UnityNode.length; i++) {
        var d = global.UnityNode[i];
        if (d.RigidBody.Add) {
            var nodeId = d.ID;
            prefabIndex++;
            global.curID++;
            global.finialInfo.push(addRigidBody(nodeId,d.RigidBody));
        }
    }
}
addRigidBody = (nodeId,data) => {
    var d = {
        "__type__": "cc.RigidBody",
        "_name": "",
        "_objFlags": 0,
        "node": {
            "__id__": nodeId
        },
        "_enabled": true,
        "_type": 0,
        "_allowSleep": true,
        "_gravityScale": data.GravityScale,
        "_linearDamping": data.LinearDamping,
        "_angularDamping": 0,
        "_linearVelocity": {
            "__type__": "cc.Vec2",
            "x": 0,
            "y": 0
        },
        "_angularVelocity": 0,
        "_fixedRotation": data.FixedRotation,
        "enabledContactListener": false,
        "bullet": data.Bullet,
        "awakeOnLoad": data.AwakeOnLoad,
        "_id": ""
    }
    if (global.isShowId) d["ID"] = global.curID;
    return d;
}
module.exports = {
    getRigidBody,
};